package com.whli.autumn.mall.web.controller.convert.sale;

import com.whli.autumn.mall.sale.domain.dto.saleorderdtl.SaleOrderDtlAddDTO;
import com.whli.autumn.mall.sale.domain.dto.saleorderdtl.SaleOrderDtlUpdateDTO;
import com.whli.autumn.mall.sale.domain.entity.SaleOrderDtl;
import com.whli.autumn.mall.sale.domain.vo.saleorderdtl.SaleOrderDtlVO;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

/**
 * <p>销售订单明细转换工具</p>
 *
 * @author whli
 * @version 1.0.0
 * @since 2023-05-01 16:38
 */
@Mapper
public interface SaleOrderDtlConvert {

    SaleOrderDtlConvert INSTANCE = Mappers.getMapper(SaleOrderDtlConvert.class);

    SaleOrderDtl addToDomain(SaleOrderDtlAddDTO dto);

    SaleOrderDtl updateToDomain(SaleOrderDtlUpdateDTO dto);

    SaleOrderDtlVO domainToVO(SaleOrderDtl entity);

}
